<%--
  Created by IntelliJ IDEA.
  User: 邹敦宇
  Date: 2021/3/4
  Time: 16:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title> <%
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/";
%>
    <base href="<%=basePath%>">
    <link rel="stylesheet" href="static/layui/css/layui.css">
    <link rel="stylesheet" href="static/css/font-awesome-4.7.0/Font-Awesome-master/css/font-awesome.min.css">
    <style>
        .layui-table-cell {
            text-align: center;
            height: auto;
            line-height: 50px;
        }
        .form-mid,.img-left,.img-right{
            float: left;
        }
        .form-mid{
            margin: 0 auto;
            width: 50%;
        }
        .img-left{
            margin-left: 10px;
            overflow: hidden;
            width: 175px;
            text-align: center;
        }
        .img-right{
            margin-right: 10px;
            overflow: hidden;
            width: 175px;

            text-align: center;
        }
    </style>
</head>
<body>
<button class="layui-btn layui-btn-lg layui-btn-normal" id="add"><span class="layui-icon layui-icon-addition"></span>
</button>

<table id="demo" lay-filter="test"></table>


<%--模态框--%>
<div id="model" style="display:none;position: relative;">
    <br>
    <div class="img-left">
        <img src="" alt="" width="175" height="200" id="productImg">
        <br>
        <br>
        <button type="button" name="file" class="layui-btn" id="file1">
            <i class="layui-icon">&#xe67c;</i>上传商品图片
        </button>
    </div>
    <div class="form-mid">
        <form class="layui-form" id="myfrom" action="">
            <input type="hidden" name="id" id="id">
            <input type="hidden" name="productImage" id="productImage">
            <input type="hidden" name="productDesc" id="productDesc">
            <div class="layui-form-item">
                <label class="layui-form-label">商品名称</label>
                <div class="layui-input-inline">
                    <input type="text" name="productName" required id="name" lay-verify="required"
                           placeholder="请输入商品名称" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">价格</label>
                <div class="layui-input-inline">
                    <input type="text" name="price" required id="price" lay-verify="required"
                           placeholder="请输入商品价格" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">商品类型</label>
                <div class="layui-input-inline">
                    <select name="productType" lay-verify="required" id="type">
                        <option value="">请选择</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">商品品牌</label>
                <div class="layui-input-inline">
                    <input type="text" name="productBrand" required id="brand" lay-verify="required"
                           placeholder="请输入商品品牌" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
    <div class="img-right">
        <img src="" alt="" width="175" height="200" id="desc">
        <br>
        <br>
        <button type="button" name="file" class="layui-btn" id="file2">
            <i class="layui-icon">&#xe67c;</i>上传商品描述图片
        </button>
    </div>
</div>

<script src="static/js/jquery-3.5.1.min.js"></script>

<script src="static/layui/layui.js"></script>
<script src="static/js/product.js"></script>
</body>
</html>
